ticketHub.config(function($stateProvider, $urlRouterProvider){
	$urlRouterProvider.otherwise('/home');
	$stateProvider
		.state('home', {
            url: '/home',
            views: {
                '': {
                    templateUrl: '../tlps/home.html',        //home页面  含有头部 main  尾部           
                    controller: function($state){
                        //$state.go('home.flightList');		//默认显示第一个国内机票
                    }
                },
                'header@home': {
                    templateUrl: '../tlps/header.html',      //header页面
                    controller:'headerCtrls'
                },
                'flightList@home': {
                    templateUrl: '../tlps/priceCalendar.html',   //中间内容部分    默认显示
                    controller:'priceCalendarCtrl'
                },
                'footer@home': {
                    templateUrl: '../tlps/footer.html'       //尾部
                }
            }
        })
        .state('home.priceCalendar', {                   //国内机票
        	 url: '/priceCalendar',
             views: {
                 'flightList@home': {    
                     templateUrl: '../tlps/priceCalendar.html',
                     controller:'priceCalendarCtrl'
                 }
             }
        })
		.state('home.order', {                                //国内订单管理
            url: '/order',
            views: {
                'flightList@home': {
                    templateUrl: '../tlps/orderMenu.html',
                    controller: function($state){
                        $state.go('home.order.inOrderQuery');//默认显示第一个tab
                        
                    }
                }             
            }
        })
        .state('home.interOrder', {                                //国际订单管理
            url: '/interOrder',
            views: {
                'flightList@home': {
                    templateUrl: '../tlps/interOrderMenu.html',
                    controller: function($state){
                        $state.go('home.interOrder.interOrderQuery');//默认显示第一个tab                       
                    }
                }             
            }
        })
        .state('home.localOrder', {                                //本地订单管理
            url: '/localOrder',
            views: {
                'flightList@home': {
                    templateUrl: '../tlps/localOrderMenu.html',
                    controller: function($state){
                        $state.go('home.localOrder.localOrderQuery');//默认显示第一个tab                       
                    }
                }             
            }
        })
        .state('home.order.inOrderQuery', {                   //国内订单查询
        	 url: '/inOrderQuery',
             views: {
                 'order': {    
                     templateUrl: '../tlps/orderManage.html',
                     controller:'orderManageCtrls'
                 }
             }
        })
         .state('home.order.changeOrderQuery', {                   //国内改签订单查询
        	 url: '/changeOrderQuery',
             views: {
                 'order': {    
                     templateUrl: '../tlps/changeOrderQuery.html',
                     controller:'changeOrderQueryCtrls'                    
                 }
             }
        })
         .state('home.order.backOrderQuery', {                   //国内退票订单查询
        	 url: '/backOrderQuery',
             views: {
                 'order': {    
                     templateUrl: '../tlps/backOrderQuery.html',
                     controller:'backOrderQueryCtrls'
                 }
             }
        })
		.state('home.orderDetail', {				             //国内订单详情	
            url: '/orderDetail/:orderID',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/orderDetail.html',
                    controller:'orderDetailCtrls'
                }
            }
        })
		.state('home.interOrder.interOrderQuery', {                             //国际订单
            url: '/interOrderQuery',
            views: {
                'interOrder': {
                    templateUrl: '../tlps/interOrderManage.html',
                    controller:'interOrderManageCtrls'
                }
            }
        })
        .state('home.interOrder.interBackOrderQuery', {                             //国际退票
            url: '/interBackOrderQuery',
            views: {
                'interOrder': {
                    templateUrl: '../tlps/interBackOrderQuery.html',
                    controller:'interBackOrderQueryCtrls'
                }
            }
        })
		.state('home.interOrderDetail', {				             //国际订单详情	
            url: '/interOrderDetail/:orderID',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/interOrderDetail.html',
                    controller:'interOrderDetailCtrls'
                }
            }
        })
        .state('home.localOrder.localOrderQuery', {                             //本地订单
            url: '/localOrderQuery',
            views: {
                'localOrder': {
                    templateUrl: '../tlps/localOrderManage.html',
                    controller:'localOrderManageCtrls'                    
                }
            }
        })
         .state('home.localOrder.localOrderBack', {                             //本地退票订单查询
            url: '/localOrderBack',
            views: {
                'localOrder': {
                    templateUrl: '../tlps/localOrderBack.html',
                    controller:'localOrderBackCtrls'                    
                }
            }
        })
        .state('home.localOrder.jhOrderBack', {                             //京杭退票订单查询
            url: '/jhOrderBack',
            views: {
                'localOrder': {
                    templateUrl: '../tlps/jhOrderBack.html',
                    controller:'jhOrderBackCtrls'                    
                }
            }
        })
		.state('home.preTicket', {				                 //国内航班预定	
            url: '/preTicket',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/preTicket.html',
                    controller:'preTicketCtrls'
                }
            }
       })             
		.state('home.internation', {				              //国际航班	
            url: '/internation',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/internation.html',
                    controller:'internationCtrls'
                }
            }
        })
		.state('home.internationQuote', {				              //国际航班报价	
            url: '/internationQuote/:data',
            views: {
                'flightList@home': {                  
                    templateUrl: '../tlps/internationQuote.html',
                    controller:'internationQuoteCtrls'
                }
            }
        })
        .state('home.endorseTheBack', {				              //国内退改签政策查询
            url: '/endorseTheBack',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/endorseTheBack.html',
                    controller:'endorseTheBackCtrls'
                }
            }
        })
        .state('home.interEndorseTheBack', {				              //国际退改签政策查询
            url: '/interEndorseTheBack',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/interEndorseTheBack.html',
                    controller:'interEndorseTheBackCtrls'
                }
            }
        })
        .state('home.passStopMess', {				              //经停信息查询	
            url: '/passStopMess',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/passStopMess.html',
                    controller:'passStopMessCtrls'
                }
            }
        })
        .state('home.PNRMess', {				              //PNR信息查询	
            url: '/PNRMess',
            views: {
                'flightList@home': {    
                    templateUrl: '../tlps/PNRMess.html',
                    controller:'PNRMessCtrls'
                }
            }
        })
         .state('home.insurance', {                             //本地订单
            url: '/insurance',
            views: {
                'flightList@home': {
                    templateUrl: '../tlps/insurance.html',
                    controller:'insuranceCtrls'                    
                }
            }
        })
        .state('home.cacheRefresh', {                             //缓存刷新
            url: '/cacheRefresh',
            views: {
                'flightList@home': {
                    templateUrl: '../tlps/cacheRefresh.html',
                    controller:'cacheRefreshCtrls'                    
                }
            }
        })
})